/* General styles */
body {
    font-family: eb-garamond;
    background-color: #f8f8f8;
    margin: 0;
    padding: 20px;
}
.header {
    display: flex;
    justify-content: flex-end;
    padding: 10px;
}

.container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    height: 100vh;
}

.left-section {
    display: flex;
    flex-direction: column;
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 70%;
    height: 100%;
    align-items: flex-start;
    position: relative;
}

.right-section {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    gap: 20px;
    width: 30%;
    height: 100%;
}
.overview, .instructions {
    display: flex;
    flex-wrap: wrap;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    flex-grow: 1;
}
.title {
    font-size: large;
    font-weight: bold;
    font-family: eb-garamond;
}
.overview  { background-color: #d8e3ff; }
.instructions { background-color: #ffd8f0; display: flex; flex-direction: column; }
.pre-activity { background-color: #ffe4b3; }

/* Button styling */
button {
    padding: 10px 15px;
    margin: 5px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
}

.content {
    font-family: eb-garamond;
    font-size: large;
}

.input-data {
    display: flex;
    gap: 10px; 
    align-items: center;
    justify-content: center;
}

.buttons {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

.speed {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Button colors */
#find-pairs-btn { background: #4db84d; color: white;}
#random-array-btn {background: #008cba; color: white;}
#reset-btn { background: #b32f2f; color: white;}

/* Styling for array visualization */
.array-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

/* Individual array elements */
.array-element {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    border-radius: 8px;
    background: white;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

.left-pointer { background-color: #ff9800; color: white;}
.right-pointer { background-color: #5568E5; color: white;}
.pair-found { background-color: #4caf50 !important;  color: white;}


.controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    align-self: center;
    flex-wrap: wrap;
}

.visualization-container {
    display: flex;
    justify-content: center;
    align-items: center;
    align-self: center;
    height: 300px;
}

#array-input,#target-input{
    border-radius: 5px;
    margin-right: 10px;
    margin-bottom: 10px;
    margin-left: 10px;
    width: 270px;
    min-height: 40px;
    min-width: 20px;
}

/* Popup container */
#popup-message{
    display: none;
    position: relative;
    background: lightblue;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    transition: opacity 0.5s ease-in-out;
    align-items: center;
    align-self: center;
}

#error-message {
    color: red;
    font-size: 18px; 
    margin-top: 8px;
    text-align: center; 
    opacity: 0;
    transition: opacity 0.3s ease;
    height: 24px; 
}

@media(max-width : 850px)
{
    .container{
        flex-direction: column;
        height: auto;
    }

    .left-section,.right-section,.overview,.instructions{
        width: 100%;
    }

    #controls{
        display: block;
    }

    .input-data{
        flex-direction: column;
    }
}

@media (max-width : 410px)
{
    button{
        font-size: 12px;
    }
}
